/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bensoft.minesweeper.resources.strings;

import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;

/**
 *
 * @author Ben Wolsieffer
 */
@SuppressWarnings("StaticNonFinalUsedInInitialization")
public class StringResources {

    private static Locale locale;
    private static ResourceBundle resources;

    static {
        locale = Locale.getDefault();
        try {
            resources = ResourceBundle.getBundle("com.bensoft.minesweeper.resources.strings.MinesweeperResources", locale);
        } catch (MissingResourceException ex) {
            System.err.println("Unable to load strings.");
            System.exit(1);
        }
    }

    public static String getString(String key) {
        return resources.getString(key);
    }
}
